import 'package:easy_read_comic/internal/http_client.dart';
import 'package:dio/dio.dart';

class SmsApi {
  // 静态变量来保存唯一的实例
  static final SmsApi _instance = SmsApi._internal();

  // 私有构造函数
  SmsApi._internal();

  // 工厂构造函数
  factory SmsApi() {
    return _instance;
  }

  // sendSms 发送验证码
  Future<Response> sendSms(String email, String event) async {
    return HttpClient().post("/v1/email/send_sms", data: {
      "email": email,
      "event": event,
    });
  }
}
